﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/TemplateAdmin.Master" Inherits="System.Web.Mvc.ViewPage<List<MvcVehicleInsurance.Models.CustomerRecord>>" %>
<%@ Import Namespace="MvcVehicleInsurance.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Search
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2 class="ico_mug">Search Customers</h2>

    <% using (Html.BeginForm()){%>
    <table>
      <tr><th>Search:</th> <td><input type="text" name="FullName" /> </td></tr>
      <tr><td colspan="2"><input type="submit" value="Search" /></td></tr>
    </table>
    <%} %>

    <table>
        <tr>
            <th></th>
            <th>
                customerID
            </th>
            <th>
                customerUsername
            </th>
            <th>
                customerPassword
            </th>
            <th>
                customerFullName
            </th>
            <th>
                customerAddress
            </th>
            <th>
                customerEmail
            </th>
            <th>
                customerPhoneNumber
            </th>
            <th>
                customerAddProve
            </th>
        </tr>

    <% foreach (MvcVehicleInsurance.Models.CustomerRecord item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Edit", "Edit", new { id=item.customerID }) %> |
                <%: Html.ActionLink("Details", "Details", new { id=item.customerID })%> |
                <%: Html.ActionLink("Delete", "Delete", new { id=item.customerID })%>
            </td>
            <td>
                <%: item.customerID %>
            </td>
            <td>
                <%: item.customerUsername %>
            </td>
            <td>
                <%: item.customerPassword %>
            </td>
            <td>
                <%: item.customerFullName %>
            </td>
            <td>
                <%: item.customerAddress %>
            </td>
            <td>
                <%: item.customerEmail %>
            </td>
            <td>
                <%: item.customerPhoneNumber %>
            </td>
            <td>
                <%: item.customerAddProve %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

